import json
import os

def test_json_list(list):

    dumps = json.dumps(list)
    # print(dumps)
    cur_dir = os.getcwd()
    with open(cur_dir + os.sep + 'list.json', 'a+') as f:
        json.dump(list, f)

    with open(cur_dir + os.sep + 'list.json', 'a+') as f1:
        f1.readline()
        # load = json.load(f)
        print(f1.readline())

if __name__ == '__main__':
    list = [1, 2, 3, 4]
    print(list[2::])